from django.db import models

# Create your models here.
class Responsable(models.Model):
	titulo = models.CharField(max_length=50)

class Usuario(models.Model):
    nombre = models.CharField(max_length=50)
    paterno = models.CharField(max_length=20)
    materno = models.CharField(max_length=20)
    cargo = models.ForeignKey(Responsable)
    usuario = models.CharField(max_length=20, unique=True)
    contrasena = models.CharField(max_length=20)
    creadofecha = models.DateTimeField(auto_now_add=True)
    modificadofecha = models.DateTimeField(auto_now=True)
    email = models.CharField(max_length=20)
    class Meta:
        db_table = 'usuarios'
        ordering = ['usuario']
    def __unicode__(self):
        return self.usuario
